/**
 * Created by wangzilong on 2017/4/11.
 */
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    ScrollView,
    TouchableOpacity,
    TextInput,
    ListView,
    Modal,
    Platform
} from 'react-native';
import ImageWrapper from './ImageWrapper';
var Dimensions = require('Dimensions');
const { width, height } = Dimensions.get('window');

export default class JunmItem extends Component{

    render(){
        var hasImg = this.props.hasImg;
        return (
            <View style={[this.props.style,styles.itemBox]}>
                <TouchableOpacity style={{flexDirection:'row',alignItems:'center',height:40}} onPress={this.props.onPress}>       
                    <View style={{flex:1}}>
                        <Text style={{fontSize:16,color:'#151515'}}>{this.props.title}</Text>
                    </View>
                    <View style={{marginRight:20}}>
                        <Text style={{color:'#9C9C9C'}}>{this.props.middleText}</Text>
                    </View>
                    {hasImg?<View>
                        <ImageWrapper style={{marginRight:10}} icon={'right'}/>
                    </View>:null}
                </TouchableOpacity>
            </View>
        )

    }

}



const styles = StyleSheet.create({
    itemBox:{
        backgroundColor:'#fff',
    }


    
});